package com.weixingtu.commuterCar.tool;


import com.weixingtu.commuterCar.tool.factory.PositionApiFactory;
import com.weixingtu.commuterCar.tool.gps.GPS;
import com.weixingtu.commuterCar.tool.position.Position;

public class Demo {
    public static void main(String[] args) {
        //实例化Position类
        Position position = new Position();
        //从工厂类获取一个GPS接口，传递选择使用的API类型
        GPS gps = PositionApiFactory.getGpsApi(PositionApiFactory.SZCZJ);
        //设置position中的GPS接口
        position.setGps(gps);
        //初始化
        position.init();
        //获取位置
        System.out.println(position.getPosition().get(0));
    }
}
